﻿<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister" targetNamespace="http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister" elementFormDefault="qualified">

  <xs:element name="Pools" nillable="true">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Pool" type="PoolType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
 
  <xs:complexType name="PoolType">
		<xs:sequence>
			<xs:element name="PoolID" type="xs:string"/>
      <xs:element name="PoolName" type="xs:string"/>
      <xs:element minOccurs="0" maxOccurs="1" name="ServiceProviders" type="ArrayOfServiceProvider" />
		</xs:sequence>
	</xs:complexType>

  <xs:complexType name="ArrayOfServiceProvider">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="ServiceProvider" nillable="true">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="1" name="DisplayName" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="SystemName" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="PublicKey" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="WebServiceURL" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="EncryptionAlgorithm" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="1" name="Contact">
              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="AddressLine1" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="AddressLine2" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="City" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="PostalCode" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="Province" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="Country" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="Phone" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="Fax" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="Email" type="xs:string" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="ServiceProviderType">
              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="1" maxOccurs="1" name="ServiceProviderTypeID" type="xs:int" />
                  <xs:element minOccurs="0" maxOccurs="1" name="DisplayName" type="xs:string" />
                  <xs:element minOccurs="0" maxOccurs="1" name="ServiceProviderTypeCode" type="xs:string" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element minOccurs="0" maxOccurs="1" name="ServiceProviderID" type="xs:string" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

</xs:schema>